package nl.grol.yakshop.domain.service;

import nl.grol.yakshop.domain.model.CustomerOrder;
import nl.grol.yakshop.domain.model.ProcessedOrder;
import nl.grol.yakshop.util.YakShopException;

/**
 * Responsible for processing orders from customers
 * 
 * @author mgrol
 *
 */
public interface OrderProcessorI {
	
	/**
	 * Process a validated customer order and convert it into a persisted ProcessedOrder.
	 * Note that the amount in the processed order can be less than the requested amounts.
	 * The processed order has a status field that describes the status.
	 * 
	 * 
	 * @param customerOrder
	 * @param daysSinceShopStart
	 * @return persisted processedOrder
	 * @throws YakShopException
	 */
	ProcessedOrder processorOrder( CustomerOrder customerOrder, int daysSinceShopStart) throws YakShopException ;

}
